using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
    [Table("bgm_project_job_assignment"), DataContract]
    public class ProjectJobAssignment
    {

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "BgmProjJobAssignId", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("bgm_proj_job_assign_seq", TypeName="int")]
        public int BgmProjJobAssignId { get; set; }

        [ForeignKey("BgmProj")]
        [DataMember, Display(Name = "BgmProjId", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("bgm_proj_seq", TypeName="int")]
        public int BgmProjId { get; set; }

        [DataMember, Display(Name = "JobTitle", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("job_title", TypeName="ntext")]
        public string JobTitle { get; set; }

        [DataMember, Display(Name = "JobDescription", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("job_description", TypeName="ntext")]
        public string JobDescription { get; set; }

        [DataMember, Display(Name = "JobStartDate", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("job_start_date", TypeName="datetime2")]
        public Nullable<System.DateTime> JobStartDate { get; set; }

        [DataMember, Display(Name = "JobEndDate", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("job_end_date", TypeName="datetime2")]
        public Nullable<System.DateTime> JobEndDate { get; set; }

        [DataMember, Display(Name = "JobStatus", ResourceType = typeof(Resources.ProjectJobAssignmentResource))]
        [Column("job_status", TypeName="int")]
        public Nullable<int> JobStatus { get; set; }

        [DataMember]
        public virtual Project BgmProj { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}